bitkeeper revision 1.980 (40d1bf9b6R-fYlUdANMWAhHfwyItoQ)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Thu, 17 Jun 2004 15:58:19 +0000 (15:58 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Thu, 17 Jun 2004 15:58:19 +0000 (15:58 +0000)
xm_dom_control bug fix

tools/examples/xm_dom_control.py
tools/xenmgr/lib/XendDomainInfo.py

index 2c93a9fed174ebafba221ef5e10cbd78811f1ba0..d098ee4a2479e85f2e07b890fbf31bfbe9cf991a 100755 (executable)
@@ -129,7 +129,9 @@ elif cmd == 'pincpu':
 
 elif cmd == 'list':
     print 'Dom  Name             Mem(MB)  CPU  State  Time(s)'
-    for dom in server.xend_domains():
+    doms = server.xend_domains()
+    doms.sort()
+    for dom in doms:
         info = server.xend_domain(dom)
         d = {}
         d['dom'] = int(dom)
index 2318df68fc0069150e68291fca5ccd81b44b6f77..b03d83a15db331a12151c442eb56e88a1e55698a 100644 (file)
@@ -116,7 +116,7 @@ class XendDomainInfo:
             state = run + stop
             sxpr.append(['cpu', self.info['cpu']])
             sxpr.append(['state', state])
-            sxpr.append(['cpu_time', self.info['cpu_time']/1e8])
+            sxpr.append(['cpu_time', self.info['cpu_time']/1e9])
         if self.console:
             sxpr.append(self.console.sxpr())
         if self.config: